﻿namespace ClassLibrary.BusinessLayer.Facade
{
    using ClassLibrary.BusinessLayer.BusinessObjects;
    using ClassLibrary.DataLayer.DataObjects;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Data.Common;

    [DataObject(true)]
    public class ClientsFacade
    {
        private IClientsDAO clientsDAO = DAOAccess.ClientsDAO;

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public bool AddClients(Clients clsClients)
        {
            return this.clientsDAO.InsertClients(clsClients);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public int AddClientsAndReturnIdentity(Clients clsClients)
        {
            return this.clientsDAO.InsertClientsReturnIdentity(clsClients);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public string AddClientsAndReturnOutput(Clients clsClients)
        {
            return this.clientsDAO.InsertClientsReturnOutput(clsClients);
        }

        [DataObjectMethod(DataObjectMethodType.Delete)]
        public bool DeleteClients(Clients clsClients)
        {
            return this.clientsDAO.DeleteClients(clsClients);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<Clients> GetClients(Clients clsClients)
        {
            return this.clientsDAO.GetClients(clsClients);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<Clients> GetClients(string clients)
        {
            Clients clsClients = new Clients();
            clsClients._Client = clients;
            return this.clientsDAO.GetClients(clsClients);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<Clients> GetsClients()
        {
            return this.clientsDAO.GetsClients();
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public DataTable GetsClients(string SPName, DbParameter[] param)
        {
            return this.clientsDAO.GetsClients(SPName, param);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<Clients> ListClients(Clients clsClients)
        {
            return this.clientsDAO.ListClients(clsClients);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IList<Clients> ListClients(string clients)
        {
            Clients clsClients = new Clients();
            clsClients._Client = clients;
            return this.clientsDAO.ListClients(clsClients);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public bool UpdateClients(Clients clsClients)
        {
            return this.clientsDAO.UpdateClients(clsClients);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public int UpdateClients(string SPName, DbParameter[] param)
        {
            return this.clientsDAO.UpdateClients(SPName, param);
        }
    }
}

